<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<TITLE>
XSSFRichTextString (POI API Documentation)
</TITLE>


<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="XSSFRichTextString (POI API Documentation)";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/XSSFRichTextString.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../org/apache/poi/xssf/usermodel/XSSFRelation.html" title="class in org.apache.poi.xssf.usermodel"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../org/apache/poi/xssf/usermodel/XSSFRow.html" title="class in org.apache.poi.xssf.usermodel"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html?org/apache/poi/xssf/usermodel/XSSFRichTextString.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="XSSFRichTextString.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.poi.xssf.usermodel</FONT>
<BR>
Class XSSFRichTextString</H2>
<PRE>
java.lang.Object
  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.poi.xssf.usermodel.XSSFRichTextString</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../org/apache/poi/ss/usermodel/RichTextString.html" title="interface in org.apache.poi.ss.usermodel">RichTextString</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>XSSFRichTextString</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../../../org/apache/poi/ss/usermodel/RichTextString.html" title="interface in org.apache.poi.ss.usermodel">RichTextString</A></DL>
</PRE>

<P>
Rich text unicode string.  These strings can have fonts applied to arbitary parts of the string.

 <p>
 Most strings in a workbook have formatting applied at the cell level, that is, the entire string in the cell has the
 same formatting applied. In these cases, the formatting for the cell is stored in the styles part,
 and the string for the cell can be shared across the workbook. The following code illustrates the example.
 </p>

 <blockquote>
 <pre>
     cell1.setCellValue(new XSSFRichTextString("Apache POI"));
     cell2.setCellValue(new XSSFRichTextString("Apache POI"));
     cell3.setCellValue(new XSSFRichTextString("Apache POI"));
 </pre>
 </blockquote>
 In the above example all three cells will use the same string cached on workbook level.

 <p>
 Some strings in the workbook may have formatting applied at a level that is more granular than the cell level.
 For instance, specific characters within the string may be bolded, have coloring, italicizing, etc.
 In these cases, the formatting is stored along with the text in the string table, and is treated as
 a unique entry in the workbook. The following xml and code snippet illustrate this.
 </p>

 <blockquote>
 <pre>
     XSSFRichTextString s1 = new XSSFRichTextString("Apache POI");
     s1.applyFont(boldArial);
     cell1.setCellValue(s1);

     XSSFRichTextString s2 = new XSSFRichTextString("Apache POI");
     s2.applyFont(italicCourier);
     cell2.setCellValue(s2);
 </pre>
 </blockquote>
<P>

<P>
<DL>
<DT><B>Author:</B></DT>
  <DD>Yegor Kozlov</DD>
</DL>
<HR>

<P>

<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/poi/xssf/usermodel/XSSFRichTextString.html#XSSFRichTextString()">XSSFRichTextString</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create empty rich text string and initialize it with empty string</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/poi/xssf/usermodel/XSSFRichTextString.html#XSSFRichTextString(org.openxmlformats.schemas.spreadsheetml.x2006.main.CTRst)">XSSFRichTextString</A></B>(org.openxmlformats.schemas.spreadsheetml.x2006.main.CTRst&nbsp;st)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a rich text string from the supplied XML bean</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/poi/xssf/usermodel/XSSFRichTextString.html#XSSFRichTextString(java.lang.String)">XSSFRichTextString</A></B>(java.lang.String&nbsp;str)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a rich text string</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/poi/xssf/usermodel/XSSFRichTextString.html#append(java.lang.String)">append</A></B>(java.lang.String&nbsp;text)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Append new text to this text run</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/poi/xssf/usermodel/XSSFRichTextString.html#append(java.lang.String, org.apache.poi.xssf.usermodel.XSSFFont)">append</A></B>(java.lang.String&nbsp;text,
       <A HREF="../../../../../org/apache/poi/xssf/usermodel/XSSFFont.html" title="class in org.apache.poi.xssf.usermodel">XSSFFont</A>&nbsp;font)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Append new text to this text run and apply the specify font to it</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/poi/xssf/usermodel/XSSFRichTextString.html#applyFont(org.apache.poi.ss.usermodel.Font)">applyFont</A></B>(<A HREF="../../../../../org/apache/poi/ss/usermodel/Font.html" title="interface in org.apache.poi.ss.usermodel">Font</A>&nbsp;font)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the font of the entire string.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/poi/xssf/usermodel/XSSFRichTextString.html#applyFont(int, int, org.apache.poi.ss.usermodel.Font)">applyFont</A></B>(int&nbsp;startIndex,
          int&nbsp;endIndex,
          <A HREF="../../../../../org/apache/poi/ss/usermodel/Font.html" title="interface in org.apache.poi.ss.usermodel">Font</A>&nbsp;font)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Applies a font to the specified characters of a string.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/poi/xssf/usermodel/XSSFRichTextString.html#applyFont(int, int, short)">applyFont</A></B>(int&nbsp;startIndex,
          int&nbsp;endIndex,
          short&nbsp;fontIndex)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Applies a font to the specified characters of a string.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/poi/xssf/usermodel/XSSFRichTextString.html#applyFont(short)">applyFont</A></B>(short&nbsp;fontIndex)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Applies the specified font to the entire string.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/poi/xssf/usermodel/XSSFRichTextString.html#clearFormatting()">clearFormatting</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes any formatting that may have been applied to the string.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;org.openxmlformats.schemas.spreadsheetml.x2006.main.CTRst</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/poi/xssf/usermodel/XSSFRichTextString.html#getCTRst()">getCTRst</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the underlying xml bean</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../org/apache/poi/xssf/usermodel/XSSFFont.html" title="class in org.apache.poi.xssf.usermodel">XSSFFont</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/poi/xssf/usermodel/XSSFRichTextString.html#getFontAtIndex(int)">getFontAtIndex</A></B>(int&nbsp;index)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return a copy of the font in use at a particular index.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../org/apache/poi/xssf/usermodel/XSSFFont.html" title="class in org.apache.poi.xssf.usermodel">XSSFFont</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/poi/xssf/usermodel/XSSFRichTextString.html#getFontOfFormattingRun(int)">getFontOfFormattingRun</A></B>(int&nbsp;index)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets a copy of the font used in a particular formatting run.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/poi/xssf/usermodel/XSSFRichTextString.html#getIndexOfFormattingRun(int)">getIndexOfFormattingRun</A></B>(int&nbsp;index)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The index within the string to which the specified formatting run applies.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/poi/xssf/usermodel/XSSFRichTextString.html#getLengthOfFormattingRun(int)">getLengthOfFormattingRun</A></B>(int&nbsp;index)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of characters this format run covers.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/poi/xssf/usermodel/XSSFRichTextString.html#getString()">getString</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the plain string representation.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/poi/xssf/usermodel/XSSFRichTextString.html#hasFormatting()">hasFormatting</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Does this string have any explicit formatting applied, or is 
  it just text in the default style?</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/poi/xssf/usermodel/XSSFRichTextString.html#length()">length</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of characters in this string.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/poi/xssf/usermodel/XSSFRichTextString.html#numFormattingRuns()">numFormattingRuns</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/poi/xssf/usermodel/XSSFRichTextString.html#preserveSpaces(org.openxmlformats.schemas.spreadsheetml.x2006.main.STXstring)">preserveSpaces</A></B>(org.openxmlformats.schemas.spreadsheetml.x2006.main.STXstring&nbsp;xs)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add the xml:spaces="preserve" attribute if the string has leading or trailing spaces</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/poi/xssf/usermodel/XSSFRichTextString.html#setString(java.lang.String)">setString</A></B>(java.lang.String&nbsp;s)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes any formatting and sets new string value</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/poi/xssf/usermodel/XSSFRichTextString.html#setStylesTableReference(org.apache.poi.xssf.model.StylesTable)">setStylesTableReference</A></B>(<A HREF="../../../../../org/apache/poi/xssf/model/StylesTable.html" title="class in org.apache.poi.xssf.model">StylesTable</A>&nbsp;tbl)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static&nbsp;org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFont</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/poi/xssf/usermodel/XSSFRichTextString.html#toCTFont(org.openxmlformats.schemas.spreadsheetml.x2006.main.CTRPrElt)">toCTFont</A></B>(org.openxmlformats.schemas.spreadsheetml.x2006.main.CTRPrElt&nbsp;pr)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CTRPrElt --> CTFont adapter</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/poi/xssf/usermodel/XSSFRichTextString.html#toString()">toString</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the plain string representation.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="XSSFRichTextString(java.lang.String)"><!-- --></A><H3>
XSSFRichTextString</H3>
<PRE>
public <B>XSSFRichTextString</B>(java.lang.String&nbsp;str)</PRE>
<DL>
<DD>Create a rich text string
<P>
</DL>
<HR>

<A NAME="XSSFRichTextString()"><!-- --></A><H3>
XSSFRichTextString</H3>
<PRE>
public <B>XSSFRichTextString</B>()</PRE>
<DL>
<DD>Create empty rich text string and initialize it with empty string
<P>
</DL>
<HR>

<A NAME="XSSFRichTextString(org.openxmlformats.schemas.spreadsheetml.x2006.main.CTRst)"><!-- --></A><H3>
XSSFRichTextString</H3>
<PRE>
public <B>XSSFRichTextString</B>(org.openxmlformats.schemas.spreadsheetml.x2006.main.CTRst&nbsp;st)</PRE>
<DL>
<DD>Create a rich text string from the supplied XML bean
<P>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="applyFont(int, int, short)"><!-- --></A><H3>
applyFont</H3>
<PRE>
public void <B>applyFont</B>(int&nbsp;startIndex,
                      int&nbsp;endIndex,
                      short&nbsp;fontIndex)</PRE>
<DL>
<DD>Applies a font to the specified characters of a string.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/poi/ss/usermodel/RichTextString.html#applyFont(int, int, short)">applyFont</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/poi/ss/usermodel/RichTextString.html" title="interface in org.apache.poi.ss.usermodel">RichTextString</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>startIndex</CODE> - The start index to apply the font to (inclusive)<DD><CODE>endIndex</CODE> - The end index to apply the font to (exclusive)<DD><CODE>fontIndex</CODE> - The font to use.</DL>
</DD>
</DL>
<HR>

<A NAME="applyFont(int, int, org.apache.poi.ss.usermodel.Font)"><!-- --></A><H3>
applyFont</H3>
<PRE>
public void <B>applyFont</B>(int&nbsp;startIndex,
                      int&nbsp;endIndex,
                      <A HREF="../../../../../org/apache/poi/ss/usermodel/Font.html" title="interface in org.apache.poi.ss.usermodel">Font</A>&nbsp;font)</PRE>
<DL>
<DD>Applies a font to the specified characters of a string.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/poi/ss/usermodel/RichTextString.html#applyFont(int, int, org.apache.poi.ss.usermodel.Font)">applyFont</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/poi/ss/usermodel/RichTextString.html" title="interface in org.apache.poi.ss.usermodel">RichTextString</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>startIndex</CODE> - The start index to apply the font to (inclusive)<DD><CODE>endIndex</CODE> - The end index to apply to font to (exclusive)<DD><CODE>font</CODE> - The index of the font to use.</DL>
</DD>
</DL>
<HR>

<A NAME="applyFont(org.apache.poi.ss.usermodel.Font)"><!-- --></A><H3>
applyFont</H3>
<PRE>
public void <B>applyFont</B>(<A HREF="../../../../../org/apache/poi/ss/usermodel/Font.html" title="interface in org.apache.poi.ss.usermodel">Font</A>&nbsp;font)</PRE>
<DL>
<DD>Sets the font of the entire string.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/poi/ss/usermodel/RichTextString.html#applyFont(org.apache.poi.ss.usermodel.Font)">applyFont</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/poi/ss/usermodel/RichTextString.html" title="interface in org.apache.poi.ss.usermodel">RichTextString</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>font</CODE> - The font to use.</DL>
</DD>
</DL>
<HR>

<A NAME="applyFont(short)"><!-- --></A><H3>
applyFont</H3>
<PRE>
public void <B>applyFont</B>(short&nbsp;fontIndex)</PRE>
<DL>
<DD>Applies the specified font to the entire string.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/poi/ss/usermodel/RichTextString.html#applyFont(short)">applyFont</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/poi/ss/usermodel/RichTextString.html" title="interface in org.apache.poi.ss.usermodel">RichTextString</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>fontIndex</CODE> - the font to apply.</DL>
</DD>
</DL>
<HR>

<A NAME="append(java.lang.String, org.apache.poi.xssf.usermodel.XSSFFont)"><!-- --></A><H3>
append</H3>
<PRE>
public void <B>append</B>(java.lang.String&nbsp;text,
                   <A HREF="../../../../../org/apache/poi/xssf/usermodel/XSSFFont.html" title="class in org.apache.poi.xssf.usermodel">XSSFFont</A>&nbsp;font)</PRE>
<DL>
<DD>Append new text to this text run and apply the specify font to it
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>text</CODE> - the text to append<DD><CODE>font</CODE> - the font to apply to the appended text or <code>null</code> if no formatting is required</DL>
</DD>
</DL>
<HR>

<A NAME="append(java.lang.String)"><!-- --></A><H3>
append</H3>
<PRE>
public void <B>append</B>(java.lang.String&nbsp;text)</PRE>
<DL>
<DD>Append new text to this text run
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>text</CODE> - the text to append</DL>
</DD>
</DL>
<HR>

<A NAME="hasFormatting()"><!-- --></A><H3>
hasFormatting</H3>
<PRE>
public boolean <B>hasFormatting</B>()</PRE>
<DL>
<DD>Does this string have any explicit formatting applied, or is 
  it just text in the default style?
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="clearFormatting()"><!-- --></A><H3>
clearFormatting</H3>
<PRE>
public void <B>clearFormatting</B>()</PRE>
<DL>
<DD>Removes any formatting that may have been applied to the string.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/poi/ss/usermodel/RichTextString.html#clearFormatting()">clearFormatting</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/poi/ss/usermodel/RichTextString.html" title="interface in org.apache.poi.ss.usermodel">RichTextString</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getIndexOfFormattingRun(int)"><!-- --></A><H3>
getIndexOfFormattingRun</H3>
<PRE>
public int <B>getIndexOfFormattingRun</B>(int&nbsp;index)</PRE>
<DL>
<DD>The index within the string to which the specified formatting run applies.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/poi/ss/usermodel/RichTextString.html#getIndexOfFormattingRun(int)">getIndexOfFormattingRun</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/poi/ss/usermodel/RichTextString.html" title="interface in org.apache.poi.ss.usermodel">RichTextString</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>index</CODE> - the index of the formatting run
<DT><B>Returns:</B><DD>the index within the string.</DL>
</DD>
</DL>
<HR>

<A NAME="getLengthOfFormattingRun(int)"><!-- --></A><H3>
getLengthOfFormattingRun</H3>
<PRE>
public int <B>getLengthOfFormattingRun</B>(int&nbsp;index)</PRE>
<DL>
<DD>Returns the number of characters this format run covers.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>index</CODE> - the index of the formatting run
<DT><B>Returns:</B><DD>the number of characters this format run covers</DL>
</DD>
</DL>
<HR>

<A NAME="getString()"><!-- --></A><H3>
getString</H3>
<PRE>
public java.lang.String <B>getString</B>()</PRE>
<DL>
<DD>Returns the plain string representation.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/poi/ss/usermodel/RichTextString.html#getString()">getString</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/poi/ss/usermodel/RichTextString.html" title="interface in org.apache.poi.ss.usermodel">RichTextString</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="setString(java.lang.String)"><!-- --></A><H3>
setString</H3>
<PRE>
public void <B>setString</B>(java.lang.String&nbsp;s)</PRE>
<DL>
<DD>Removes any formatting and sets new string value
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>s</CODE> - new string value</DL>
</DD>
</DL>
<HR>

<A NAME="toString()"><!-- --></A><H3>
toString</H3>
<PRE>
public java.lang.String <B>toString</B>()</PRE>
<DL>
<DD>Returns the plain string representation.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="length()"><!-- --></A><H3>
length</H3>
<PRE>
public int <B>length</B>()</PRE>
<DL>
<DD>Returns the number of characters in this string.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/poi/ss/usermodel/RichTextString.html#length()">length</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/poi/ss/usermodel/RichTextString.html" title="interface in org.apache.poi.ss.usermodel">RichTextString</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the number of characters in the font.</DL>
</DD>
</DL>
<HR>

<A NAME="numFormattingRuns()"><!-- --></A><H3>
numFormattingRuns</H3>
<PRE>
public int <B>numFormattingRuns</B>()</PRE>
<DL>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/poi/ss/usermodel/RichTextString.html#numFormattingRuns()">numFormattingRuns</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/poi/ss/usermodel/RichTextString.html" title="interface in org.apache.poi.ss.usermodel">RichTextString</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>The number of formatting runs used.</DL>
</DD>
</DL>
<HR>

<A NAME="getFontOfFormattingRun(int)"><!-- --></A><H3>
getFontOfFormattingRun</H3>
<PRE>
public <A HREF="../../../../../org/apache/poi/xssf/usermodel/XSSFFont.html" title="class in org.apache.poi.xssf.usermodel">XSSFFont</A> <B>getFontOfFormattingRun</B>(int&nbsp;index)</PRE>
<DL>
<DD>Gets a copy of the font used in a particular formatting run.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>index</CODE> - the index of the formatting run
<DT><B>Returns:</B><DD>A copy of the  font used or null if no formatting is applied to the specified text run.</DL>
</DD>
</DL>
<HR>

<A NAME="getFontAtIndex(int)"><!-- --></A><H3>
getFontAtIndex</H3>
<PRE>
public <A HREF="../../../../../org/apache/poi/xssf/usermodel/XSSFFont.html" title="class in org.apache.poi.xssf.usermodel">XSSFFont</A> <B>getFontAtIndex</B>(int&nbsp;index)</PRE>
<DL>
<DD>Return a copy of the font in use at a particular index.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>index</CODE> - The index.
<DT><B>Returns:</B><DD>A copy of the  font that's currently being applied at that
                      index or null if no font is being applied or the
                      index is out of range.</DL>
</DD>
</DL>
<HR>

<A NAME="getCTRst()"><!-- --></A><H3>
getCTRst</H3>
<PRE>
<FONT SIZE="-1"><A HREF="../../../../../org/apache/poi/util/Internal.html" title="annotation in org.apache.poi.util">@Internal</A>
</FONT>public org.openxmlformats.schemas.spreadsheetml.x2006.main.CTRst <B>getCTRst</B>()</PRE>
<DL>
<DD>Return the underlying xml bean
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="setStylesTableReference(org.apache.poi.xssf.model.StylesTable)"><!-- --></A><H3>
setStylesTableReference</H3>
<PRE>
protected void <B>setStylesTableReference</B>(<A HREF="../../../../../org/apache/poi/xssf/model/StylesTable.html" title="class in org.apache.poi.xssf.model">StylesTable</A>&nbsp;tbl)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="toCTFont(org.openxmlformats.schemas.spreadsheetml.x2006.main.CTRPrElt)"><!-- --></A><H3>
toCTFont</H3>
<PRE>
protected static org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFont <B>toCTFont</B>(org.openxmlformats.schemas.spreadsheetml.x2006.main.CTRPrElt&nbsp;pr)</PRE>
<DL>
<DD>CTRPrElt --> CTFont adapter
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="preserveSpaces(org.openxmlformats.schemas.spreadsheetml.x2006.main.STXstring)"><!-- --></A><H3>
preserveSpaces</H3>
<PRE>
protected static void <B>preserveSpaces</B>(org.openxmlformats.schemas.spreadsheetml.x2006.main.STXstring&nbsp;xs)</PRE>
<DL>
<DD>Add the xml:spaces="preserve" attribute if the string has leading or trailing spaces
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>xs</CODE> - the string to check</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/XSSFRichTextString.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../org/apache/poi/xssf/usermodel/XSSFRelation.html" title="class in org.apache.poi.xssf.usermodel"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../org/apache/poi/xssf/usermodel/XSSFRow.html" title="class in org.apache.poi.xssf.usermodel"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html?org/apache/poi/xssf/usermodel/XSSFRichTextString.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="XSSFRichTextString.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>

                <i>Copyright 2016 The Apache Software Foundation or
        its licensors, as applicable.</i>
            
</BODY>
</HTML>
